/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wx
 * Date: 2023-08-03
 * Time: 11:12
 */
 public class Person {

    private String name;
    private int age;

    public  Person() {
        System.out.println("不带参数的构造方法");

    }
    public  Person(String name, int age) {
        this.name = name;
        this.age  = age;
        System.out.println("带参数的构造方法");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }


    public void sleep() {

    }

}
